
// Vue 3 初始化代码
import { createSSRApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import { initLoginModalListener } from './utils/loginModal.js'
import UniIcons from './uni_modules/uni-icons/components/uni-icons/uni-icons.vue'

export function createApp() {
  const app = createSSRApp(App)
  const pinia = createPinia()
  
  app.use(pinia)
  
  // 全局注册uni-icons组件
  app.component('uni-icons', UniIcons)
  
  // 初始化全局登录弹窗监听器
  initLoginModalListener()
  
  return {
    app
  }
}